<style>
    .user_panel{
        float: left;
        margin: 10px 0px 0px 10px;
    }
</style>
<?php
$user = \Core\Session\FrontSessionHelper::getUser();
if($user){
    $allDomains = $user->getActiveDomains();
}

if($user){
    echo '
<div class="col-md-4 col-sm-8 col-xsm-8">
<div class="user_panel">
<ul class="user-info pull-left pull-none-xsm">
    <li class="profile-info dropdown">
        <a data-toggle="dropdown" class="dropdown-toggle" href="neon.html#">
            <img class="img-circle" alt="" src="/public/images/icons/blank_portrain.jpg">
            '.$user->username.'
        </a>
        <ul class="dropdown-menu">
            <li class="caret"></li>
            <li>
                <a href="/ca-nhan">
                    <i class="entypo-user"></i>
                    Trang cá nhân
                </a>
            </li>';
if($allDomains)
foreach ($allDomains as $aDomain) {
    echo '<li>
                <a href="/'.strtolower($aDomain->domain).'/admin">
                    <i class="entypo-calendar"></i>
                    '.$aDomain->name.'
                </a>
            </li>';
}



echo '<li>
                <a href="javascript:logout()">
                    <i class="entypo-logout"></i>
                    Logout
                </a>
            </li>
        </ul>
    </li>

</ul>

<ul class="user-info pull-left pull-right-xs pull-none-xsm">


<li class="notifications dropdown">

    <a data-close-others="true" data-hover="dropdown" data-toggle="dropdown" class="dropdown-toggle" href="neon.html#">
        <i class="entypo-attention"></i>
        <span class="badge badge-info">6</span>
    </a>

    <ul class="dropdown-menu">
        <li class="top">
            <p class="small">
                <a class="pull-right" href="neon.html#">Mark all Read</a>
                You have <strong>3</strong> new notifications.
            </p>
        </li>

        <li>
            <ul class="dropdown-menu-list scroller" style="overflow: hidden;" tabindex="5001">
                <li class="unread notification-success">
                    <a href="neon.html#">
                        <i class="entypo-user-add pull-right"></i>

				<span class="line">
					<strong>New user registered</strong>
				</span>

				<span class="line small">
					30 seconds ago
				</span>
                    </a>
                </li>

                <li class="unread notification-secondary">
                    <a href="neon.html#">
                        <i class="entypo-heart pull-right"></i>

				<span class="line">
					<strong>Someone special liked this</strong>
				</span>

				<span class="line small">
					2 minutes ago
				</span>
                    </a>
                </li>

                <li class="notification-primary">
                    <a href="neon.html#">
                        <i class="entypo-user pull-right"></i>

				<span class="line">
					<strong>Privacy settings have been changed</strong>
				</span>

				<span class="line small">
					3 hours ago
				</span>
                    </a>
                </li>

                <li class="notification-danger">
                    <a href="neon.html#">
                        <i class="entypo-cancel-circled pull-right"></i>

				<span class="line">
					John cancelled the event
				</span>

				<span class="line small">
					9 hours ago
				</span>
                    </a>
                </li>

                <li class="notification-info">
                    <a href="neon.html#">
                        <i class="entypo-info pull-right"></i>

				<span class="line">
					The server is status is stable
				</span>

				<span class="line small">
					yesterday at 10:30am
				</span>
                    </a>
                </li>

                <li class="notification-warning">
                    <a href="neon.html#">
                        <i class="entypo-rss pull-right"></i>

				<span class="line">
					New comments waiting approval
				</span>

				<span class="line small">
					last week
				</span>
                    </a>
                </li>
            </ul>
        </li>

        <li class="external">
            <a href="neon.html#">View all notifications</a>
        </li>				<div id="ascrail2001" class="nicescroll-rails" style="padding-right: 3px; width: 8px; z-index: 1000; cursor: default; position: absolute; top: 0px; left: -8px; height: 0px; display: none;"><div style="position: relative; top: 0px; float: right; width: 5px; height: 0px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div><div id="ascrail2001-hr" class="nicescroll-rails" style="height: 5px; z-index: 1000; top: -5px; left: 0px; position: absolute; cursor: default; display: none;"><div style="position: relative; top: 0px; height: 5px; width: 0px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div></ul>

</li>


<li class="notifications dropdown">

    <a data-close-others="true" data-hover="dropdown" data-toggle="dropdown" class="dropdown-toggle" href="neon.html#">
        <i class="entypo-mail"></i>
        <span class="badge badge-secondary">10</span>
    </a>

    <ul class="dropdown-menu">
        <li>
            <ul class="dropdown-menu-list scroller" style="overflow: hidden;" tabindex="5002">
                <li class="active">
                    <a href="neon.html#">
				<span class="image pull-right">
					<img class="img-circle" alt="" src="/public/images/icons/blank_portrain.jpg">
				</span>

				<span class="line">
					<strong>Luc Chartier</strong>
					- yesterday
				</span>

				<span class="line desc small">
					This ain’t our first item, it is the best of the rest.
				</span>
                    </a>
                </li>

                <li class="active">
                    <a href="neon.html#">
				<span class="image pull-right">
					<img class="img-circle" alt="" src="/public/images/thumb-2.png">
				</span>

				<span class="line">
					<strong>Salma Nyberg</strong>
					- 2 days ago
				</span>

				<span class="line desc small">
					Oh he decisively impression attachment friendship so if everything.
				</span>
                    </a>
                </li>

                <li>
                    <a href="neon.html#">
				<span class="image pull-right">
					<img class="img-circle" alt="" src="/public/images/thumb-3.png">
				</span>

				<span class="line">
					Hayden Cartwright
					- a week ago
				</span>

				<span class="line desc small">
					Whose her enjoy chief new young. Felicity if ye required likewise so doubtful.
				</span>
                    </a>
                </li>

                <li>
                    <a href="neon.html#">
				<span class="image pull-right">
					<img class="img-circle" alt="" src="/public/images/thumb-4.png">
				</span>

				<span class="line">
					Sandra Eberhardt
					- 16 days ago
				</span>

				<span class="line desc small">
					On so attention necessary at by provision otherwise existence direction.
				</span>
                    </a>
                </li>
            </ul>
        </li>

        <li class="external">
            <a href="mailbox/main/main.html">All Messages</a>
        </li>				<div id="ascrail2002" class="nicescroll-rails" style="padding-right: 3px; width: 8px; z-index: 1000; cursor: default; position: absolute; top: 0px; left: -8px; height: 0px; display: none;"><div style="position: relative; top: 0px; float: right; width: 5px; height: 0px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div><div id="ascrail2002-hr" class="nicescroll-rails" style="height: 5px; z-index: 1000; top: -5px; left: 0px; position: absolute; cursor: default; display: none;"><div style="position: relative; top: 0px; height: 5px; width: 0px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div></ul>

</li>


<li class="notifications dropdown">

    <a data-close-others="true" data-hover="dropdown" data-toggle="dropdown" class="dropdown-toggle" href="neon.html#">
        <i class="entypo-list"></i>
        <span class="badge badge-warning">1</span>
    </a>

    <ul class="dropdown-menu">
        <li class="top">
            <p>You have 6 pending tasks</p>
        </li>

        <li>
            <ul class="dropdown-menu-list scroller" style="overflow: hidden;" tabindex="5003">
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">Procurement</span>
					<span class="percent">27%</span>
				</span>

				<span class="progress">
					<span class="progress-bar progress-bar-success" style="width: 27%;">
						<span class="sr-only">27% Complete</span>
					</span>
				</span>
                    </a>
                </li>
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">App Development</span>
					<span class="percent">83%</span>
				</span>

				<span class="progress progress-striped">
					<span class="progress-bar progress-bar-danger" style="width: 83%;">
						<span class="sr-only">83% Complete</span>
					</span>
				</span>
                    </a>
                </li>
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">HTML Slicing</span>
					<span class="percent">91%</span>
				</span>

				<span class="progress">
					<span class="progress-bar progress-bar-success" style="width: 91%;">
						<span class="sr-only">91% Complete</span>
					</span>
				</span>
                    </a>
                </li>
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">Database Repair</span>
					<span class="percent">12%</span>
				</span>

				<span class="progress progress-striped">
					<span class="progress-bar progress-bar-warning" style="width: 12%;">
						<span class="sr-only">12% Complete</span>
					</span>
				</span>
                    </a>
                </li>
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">Backup Create Progress</span>
					<span class="percent">54%</span>
				</span>

				<span class="progress progress-striped">
					<span class="progress-bar progress-bar-info" style="width: 54%;">
						<span class="sr-only">54% Complete</span>
					</span>
				</span>
                    </a>
                </li>
                <li>
                    <a href="neon.html#">
				<span class="task">
					<span class="desc">Upgrade Progress</span>
					<span class="percent">17%</span>
				</span>

				<span class="progress progress-striped">
					<span class="progress-bar progress-bar-important" style="width: 17%;">
						<span class="sr-only">17% Complete</span>
					</span>
				</span>
                    </a>
                </li>
            </ul>
        </li>

        <li class="external">
            <a href="neon.html#">See all tasks</a>
        </li>				<div id="ascrail2003" class="nicescroll-rails" style="padding-right: 3px; width: 8px; z-index: 1000; cursor: default; position: absolute; top: 43.15px; left: 361px; height: 290px; display: none; opacity: 0;"><div style="position: relative; top: 0px; float: right; width: 5px; height: 242px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div><div id="ascrail2003-hr" class="nicescroll-rails" style="height: 5px; z-index: 1000; top: 328.15px; left: 1px; position: absolute; cursor: default; display: none; width: 360px; opacity: 0;"><div style="position: relative; top: 0px; height: 5px; width: 368px; background-color: rgb(212, 212, 212); border: 1px solid rgb(204, 204, 204); background-clip: padding-box; border-radius: 1px;"></div></div></ul>

</li>

</ul>

</div>
</div>
';
}
?>

